'use strict'

const express = require('express')

let router = express.Router()

// https://www.npmjs.com/package/module-alias node项目中使用路径别名
const { getAllUsers, pcLogin } = require('@controller/userController.js')

/**
 * PC登录
 * @route POST /api/private/pcLogin
 * @group login - Operations about login
 * @param {string} username.query.required 用户名
 * @param {string} password.query.required 密码
 * @returns {object} 200 - An array of user info
 * @returns {Error}  default - Unexpected error
 */
router.post('pcLogin', pcLogin)

/**
 * 获取所有用户
 * @route GET /api/private/getAllUsers
 * @group user - Operations about user
 * @param {string} Authorization.header token认证
 * @returns {object} 200 - An array of user info
 * @returns {Error}  default - Unexpected error
 */
router.get('getAllUsers', getAllUsers)

module.exports = router